﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TreeDataStructure
{
    class Node
    {
        public int globalID;
        private int localID;
        public int nodeData;
        public Node leftNode { get; set; }
        public Node rightNode { get; set; }

        public Node(int masterID, int localID, Node parent)
        {
            this.globalID = masterID;
            this.localID = localID;
            this.leftNode = null;
            this.rightNode = null;
        }

        public Node childNode(Node parentNode)
        {
            Node childNode1 = new Node(parentNode.globalID + 1, 1, parentNode);
            {
                childNode1.rightNode = null;
                childNode1.leftNode = null;
            }
            Node childNode2 = new Node(parentNode.globalID + 2, 2, parentNode);
            {
                childNode2.rightNode = null;
                childNode2.leftNode = null;
            }
            return childNode1;
        }
    }
}
